import request, { download } from '@/utils/request'

export default {

  /**
   * 查询登录日志列表
   * @param query
   * @returns
   */
  page: (query: any) => {
    return request.get('/admin/system/log/login/page', { params: query })
  },

  /**
   * 删除登录日志
   * @param ids
   * @returns
   */
  delete: (ids: any) => {
    return request.delete(`/admin/system/log/login/${ids}`)
  },

  /**
   * 清空登录日志
   * @returns
   */
  clean: () => {
    return request.delete('/admin/system/log/login/clean')
  },

  /**
   * 导出登录日志
   * @param query
   * @param fileName
   * @returns
   */
  download: (query: any, fileName: string) => {
    download('/admin/system/log/login/export', query, fileName,{})
  }

}